/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.dahg.project.controller.model.beans.impl;

import java.util.List;
import javax.ejb.Stateless;
import org.dahg.project.controller.model.Categoria;
import org.dahg.project.controller.model.beans.AbstractBean;
import org.dahg.project.controller.model.services.local.MenuService;

/**
 *
 * @author dahg
 */
@Stateless
public class MenuServiceImpl extends AbstractBean<Categoria> implements MenuService {

    @Override
    protected Class<Categoria> getClazz() {
        return Categoria.class;
    }

    @Override
    public void remove(Categoria obj) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public List<Categoria> getAllCategorias() {
        String sql="Select c from Categoria c order by c.id asc";
        List<Categoria> lista= getEntityManager().createQuery(sql, getClazz()).getResultList();
        return lista;
    }
    
}
